package org.yagnus.datastructure;

/**
 * This is the most abstract representation of a range, a subset X of a totally
 * ordered set S where X is {x \in S st a<x<b}, the strictness of inequality
 * depending on if the set is open on the left and right.
 * 
 * @author Hsb
 * 
 * @param <BASETYPE>
 */
public interface Range<SELF extends Range<SELF, BASETYPE>, BASETYPE extends Comparable<BASETYPE>> {

	public abstract boolean isOpenOnTheLeft();

	public abstract boolean isOpenOnTheRight();

	public abstract BASETYPE getMin();

	public abstract BASETYPE getMax();

	public abstract <O extends SELF> boolean intersects(O o);

}